cmake_minimum_required(VERSION 3.30)


project(lqtech_cuda LANGUAGES CXX CUDA)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CUDA_STANDARD 20)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
set(CMAKE_CUDA_ARCHITECTURES 80)


#add_executable(main main.cu)
#add_executable(ch02_01_segmm_segmm Learn-CUDA-Programming/Chapter02/02_memory_overview/01_sgemm/sgemm.cu)
#add_executable(ch02_02_vector_add Learn-CUDA-Programming/Chapter02/02_memory_overview/02_vector_addition/vector_addition_gpu_thread_block.cu)
#add_executable(ch02_03_soa Learn-CUDA-Programming/Chapter02/02_memory_overview/03_aos_soa/soa.cu)
#add_executable(ch02_03_aos Learn-CUDA-Programming/Chapter02/02_memory_overview/03_aos_soa/aos.cu)

#add_executable(sam0_asyncApi cuda-samples/Samples/0_Introduction/asyncAPI/asyncAPI.cu)
#target_include_directories(sam0_asyncApi PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")
#
#add_executable(sam0_c++11_cuda cuda-samples/Samples/0_Introduction/c++11_cuda/c++11_cuda.cu)
#target_include_directories(sam0_c++11_cuda PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")
#
#add_executable(sam0_clock cuda-samples/Samples/0_Introduction/clock/clock.cu)
#target_include_directories(sam0_clock PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(sam0_concurrentKernels cuda-samples/Samples/0_Introduction/concurrentKernels/concurrentKernels.cu)
#target_include_directories(sam0_concurrentKernels PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(matrixMul cuda-samples/Samples/0_Introduction/matrixMul/matrixMul.cu)
#target_include_directories(matrixMul PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(simpleAssert cuda-samples/Samples/0_Introduction/simpleAssert/simpleAssert.cu)
#target_include_directories(simpleAssert PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(simpleAttributes cuda-samples/Samples/0_Introduction/simpleAttributes/simpleAttributes.cu)
#target_include_directories(simpleAttributes PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(simpleAWBarrier cuda-samples/Samples/0_Introduction/simpleAWBarrier/simpleAWBarrier.cu)
#target_include_directories(simpleAWBarrier PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(simpleCooperativeGroups cuda-samples/Samples/0_Introduction/simpleCooperativeGroups/simpleCooperativeGroups.cu)
#target_include_directories(simpleCooperativeGroups PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(simpleCubemapTexture cuda-samples/Samples/0_Introduction/simpleCubemapTexture/simpleCubemapTexture.cu)
#target_include_directories(simpleCubemapTexture PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

#add_executable(simpleHyperQ cuda-samples/Samples/0_Introduction/simpleHyperQ/simpleHyperQ.cu)
#target_include_directories(simpleHyperQ PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")

add_subdirectory(cuda-samples/Common)

add_executable(simpleIPC cuda-samples/Samples/0_Introduction/simpleIPC/simpleIPC.cu)
target_link_libraries(simpleIPC PUBLIC helper_multiprocess)
target_include_directories(
        simpleIPC PUBLIC
        "${PROJECT_SOURCE_DIR}/cuda-samples/Common"
)


#target_link_libraries(simpleIPC PUBLIC helper_multiprocess)

#target_include_directories(simpleIPC PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")
#add_library(helper_multiprocess "${PROJECT_SOURCE_DIR}/cuda-samples/Common/helper_multiprocess.cpp")






#target_include_directories(helper_multiprocess PUBLIC "${PROJECT_SOURCE_DIR}/cuda-samples/Common")
#set_target_properties(helper_multiprocess PROPERTIES LINKER_LANGUAGE CXX)



#set_target_properties(simpleCubemapTexture PROPERTIES CUDA_SEPARABLE_COMPILATION ON)

#set_target_properties(helper_multiprocess PROPERTIES LINKER_LANGUAGE CXX)
